﻿<%@ Page Language="C#" MasterPageFile="~/MasterAjax.Master" AutoEventWireup="true" CodeBehind="CustomersView.aspx.cs" Inherits="DMS.Web.CustomersView" Title="Customers" %>

<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
	Namespace="DevExpress.Web.ASPxHiddenField" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
	Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
	Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<table>
		<tr>
			<td><dxe:ASPxLabel ID="lblContry" Text="Country" runat="server" ></dxe:ASPxLabel></td>
			<td><dxe:ASPxTextBox ID="txtCountry" runat="server" Text="France" Width="170px"></dxe:ASPxTextBox></td>
			<td><dxe:ASPxButton ID="btnSearch" runat="server" Text="Search"></dxe:ASPxButton></td>
		</tr>
	</table>
    <dxwgv:ASPxGridView ID="gridCustomers" runat="server" DataSourceID="odsCustomers" KeyFieldName="Id" Width="100%">
        <Columns>
            <dxwgv:GridViewCommandColumn>
                <EditButton Visible="true" />
                <NewButton Visible="True" />
                <DeleteButton Visible="True" />
            </dxwgv:GridViewCommandColumn>
            <dxwgv:GridViewDataColumn FieldName="FirstName" />
            <dxwgv:GridViewDataColumn FieldName="LastName" />
            <dxwgv:GridViewDataColumn FieldName="Country" />
            <dxwgv:GridViewDataColumn FieldName="State" />
            <dxwgv:GridViewDataColumn FieldName="City" />
        </Columns>
        <Settings ShowFilterRow="True" ShowGroupPanel="true"/>
        <SettingsBehavior ConfirmDelete="true" />
        <SettingsEditing EditFormColumnCount="1" Mode="PopupEditForm" PopupEditFormModal="true" PopupEditFormHorizontalAlign="Center" PopupEditFormVerticalAlign="Middle" />
    </dxwgv:ASPxGridView>
    <asp:ObjectDataSource ID="odsCustomers" runat="server" DataObjectTypeName="DMS.DTOs.CustomerDTO, DMS.DTOs" TypeName="DMS.Web.DataSources.CustomerDataSource"
						  SelectMethod="Select" InsertMethod="Save" UpdateMethod="Save" DeleteMethod="Delete">
         <SelectParameters>
            <asp:ControlParameter Name="country" PropertyName="Text" ControlID="txtCountry" />
         </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
